#ifndef EXCEPTION_FUNC_H_
#define EXCEPTION_FUNC_H_

#include <windows.h>
#include <eh.h> 
#include "Exception.h"
#pragma warning(disable: 4200)	

#pragma optimize( "y", off )	

namespace sbase
{
	void trans_func( unsigned int u, EXCEPTION_POINTERS* pExp );
	  
	class CExTranslator
	{
	public:	
		CExTranslator() : OldFanc(NULL)		{ OldFanc = _set_se_translator( trans_func );}
		~CExTranslator()					{ if(OldFanc) _set_se_translator(OldFanc); }
	private:
		_se_translator_function OldFanc;
	};
}

#endif
